import React from "react";
import { Switch, Route ,Redirect} from "react-router-dom"
import Login from "./pages/Login/Login"
import Register from "./pages/Register/Register"
import Index from "./pages/Index/Index"
import List from "./pages/List/List"
import Home from "./pages/Home/Home"
import Goods from "./pages/Goods/Goods"

function App() {
  return (
    <div >
      <Switch>
        <Route path="/login" component={Login}></Route>
        <Route path="/register" component={Register}></Route>
        <Route path="/index" component={Index}></Route>
        <Route path="/list" component={List}></Route>
        <Route path="/home" component={Home}></Route>
        <Route path="/goods/:id/:type" component={Goods}></Route>
        <Redirect to="/login"></Redirect>
      </Switch>
    </div>
  );
}

export default App;
